package com.gcm.service;

import java.util.ArrayList;
import java.util.List;

import model.Instance;

import org.springframework.stereotype.Service;

@Service
public class PersistanceService{
 
	List<Instance> instanceList = new ArrayList<Instance>();	
	
	
	public void add(Instance instance) {
	 
		if(!instanceList.contains(instance))
			instanceList.add(instance);
 
	}

	public void remove(Instance instance) {
		 
		instanceList.remove(instance);
 
	}

	public List<Instance> getInstanceList() {
		return instanceList;
	}

	public void setInstanceList(List<Instance> instanceList) {
		this.instanceList = instanceList;
	}
 
}